Skip to content

Conversation

@kristofvandam
Copy link
Contributor

Description

It is perfectly fine have more mappings per mapname, ref.

The current implementation doesn't allow repetitions of mapnames in pg_ident.conf, with this change an entry is unique based on map_name, system_username and database_username.

This allows for multiple system users to be mapped to a single database user.

Issues Resolved

No issue was created regarding tis PR

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

@kristofvandam kristofvandam requested a review from a team as a code owner June 20, 2025 11:09
@kristofvandam kristofvandam force-pushed the kv/multi_ident_mapnames branch from 609d3df to 8f98d71 Compare June 20, 2025 11:10
It is perfectly fine have more mappings per mapname, [ref](https://www.postgresql.org/docs/current/auth-username-maps.html).

The current implementation doesn't allow repetitions of mapnames in
`pg_ident.conf`, with this change an entry is unique based on map_name,
system_username and database_username.

This allows for multiple system users to be mapped to a single database
user.
@kristofvandam kristofvandam force-pushed the kv/multi_ident_mapnames branch 3 times, most recently from bf02aed to d25ebd4 Compare June 20, 2025 12:48
@bmhughes bmhughes added Feature Request Enhancement to existing functionality or new functionality Release: Minor Release to Chef Supermarket as a minor release when merged labels Jun 20, 2025
@kristofvandam
Copy link
Contributor Author

would fix #787

@kristofvandam kristofvandam force-pushed the kv/multi_ident_mapnames branch from d25ebd4 to e34804e Compare June 20, 2025 13:38
damacus
damacus previously approved these changes Jun 21, 2025
@damacus
Copy link
Member

damacus commented Jun 21, 2025

Looks like we got a small test error. Ping me when this is fixed 👌

Thanks!

mdl doesn't like url's that are not clickable, but for the sake of
defining a default value for a resource, we can ignore this error.
when the mapname (or any other field in the ident file) exceeds the
predefined width, the values are 'glued' together. This renders the file
invalid.

similar like this issue:
sous-chefs#733 we now force a space
between the values if the exceed the column width.
@kristofvandam kristofvandam force-pushed the kv/multi_ident_mapnames branch from 9121f03 to a21353f Compare June 24, 2025 06:55
@kristofvandam
Copy link
Contributor Author

Some tests are failing due to chef/chef#15048. Without that fix i will be unable to fix the tests, after that fix i'll look into the rest.

I'm mainly testing against ident-17-debian-12, there the tests are succeeding (works on my machine 😅 )

@bmhughes
Copy link
Contributor

The indempotency issues we can ignore for now, but there are a large number of ident tests failing too which would suggest that this PR has either broken something or the tests need updating to match the new behaviour.

If we can get those sorted then this can be merged 👍

@damacus damacus changed the base branch from main to multi_ident_mapnames July 14, 2025 13:15
@damacus
Copy link
Member

damacus commented Jul 14, 2025

There are a few things wrong here. So I'm going to bring them into the multi_ident_mapnames branch and fix them there. 👍🏼

@damacus damacus merged commit 69058e7 into sous-chefs:multi_ident_mapnames Jul 14, 2025
77 of 146 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Request Enhancement to existing functionality or new functionality Release: Minor Release to Chef Supermarket as a minor release when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants